package com.ydch.spring.test.log;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainApp {
	private static final Logger logger = LogManager.getLogger(MainApp.class);

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"HelloBean.xml");
		logger.info("Going to create HelloWord Obj");
		HelloWorld obj = (HelloWorld) context.getBean("log4jHelloWorld");
		obj.getMessage();
		logger.info("Exiting the program");
	}
}
